/* 自定义样式 */

/* 通知动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

.notification-enter {
    animation: fadeIn 0.3s ease-out forwards;
}

.notification-leave {
    animation: fadeOut 0.3s ease-in forwards;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    max-width: 100%;
}

.table-hover tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 状态样式 */
.status-scanned {
    color: #10b981;
    font-weight: 500;
}

.status-unscanned {
    color: #ef4444;
    font-weight: 500;
}

/* 完成率样式 */
.completion-high {
    color: #10b981;
    font-weight: 500;
}

.completion-medium {
    color: #f59e0b;
    font-weight: 500;
}

.completion-low {
    color: #ef4444;
    font-weight: 500;
}

/* 闪烁效果 */
@keyframes flash-success {
    0% { background-color: rgba(16, 185, 129, 0.2); }
    100% { background-color: transparent; }
}

@keyframes flash-error {
    0% { background-color: rgba(239, 68, 68, 0.2); }
    100% { background-color: transparent; }
}

.flash-success {
    animation: flash-success 1s ease-out;
}

.flash-error {
    animation: flash-error 1s ease-out;
}

/* 响应式布局调整 */
@media (max-width: 768px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .flex-col-mobile {
        flex-direction: column;
    }
    
    .space-y-mobile > * + * {
        margin-top: 0.5rem;
    }
    
    .w-full-mobile {
        width: 100%;
    }
    
    .mt-3-mobile {
        margin-top: 0.75rem;
    }
}

/* 输入框聚焦样式 */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* 按钮悬停效果 */
.btn-hover-effect:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-hover-effect:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* 卡片悬停效果 */
.card-hover:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
